{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pickle as pkl\n",
    "import pandas as pd\n",
    "import random\n",
    "import numpy as np\n",
    "import time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>customer_id</th>\n",
       "      <th>FN</th>\n",
       "      <th>Active</th>\n",
       "      <th>club_member_status</th>\n",
       "      <th>fashion_news_frequency</th>\n",
       "      <th>age</th>\n",
       "      <th>postal_code</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>00000dbacae5abe5e23885899a1fa44253a17956c6d1c3...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>ACTIVE</td>\n",
       "      <td>NONE</td>\n",
       "      <td>49.0</td>\n",
       "      <td>52043ee2162cf5aa7ee79974281641c6f11a68d276429a...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0000423b00ade91418cceaf3b26c6af3dd342b51fd051e...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>ACTIVE</td>\n",
       "      <td>NONE</td>\n",
       "      <td>25.0</td>\n",
       "      <td>2973abc54daa8a5f8ccfe9362140c63247c5eee03f1d93...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>000058a12d5b43e67d225668fa1f8d618c13dc232df0ca...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>ACTIVE</td>\n",
       "      <td>NONE</td>\n",
       "      <td>24.0</td>\n",
       "      <td>64f17e6a330a85798e4998f62d0930d14db8db1c054af6...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>00005ca1c9ed5f5146b52ac8639a40ca9d57aeff4d1bd2...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>ACTIVE</td>\n",
       "      <td>NONE</td>\n",
       "      <td>54.0</td>\n",
       "      <td>5d36574f52495e81f019b680c843c443bd343d5ca5b1c2...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>00006413d8573cd20ed7128e53b7b13819fe5cfc2d801f...</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>ACTIVE</td>\n",
       "      <td>Regularly</td>\n",
       "      <td>52.0</td>\n",
       "      <td>25fa5ddee9aac01b35208d01736e57942317d756b32ddd...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1371975</th>\n",
       "      <td>ffffbbf78b6eaac697a8a5dfbfd2bfa8113ee5b403e474...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>ACTIVE</td>\n",
       "      <td>NONE</td>\n",
       "      <td>24.0</td>\n",
       "      <td>7aa399f7e669990daba2d92c577b52237380662f36480b...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1371976</th>\n",
       "      <td>ffffcd5046a6143d29a04fb8c424ce494a76e5cdf4fab5...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>ACTIVE</td>\n",
       "      <td>NONE</td>\n",
       "      <td>21.0</td>\n",
       "      <td>3f47f1279beb72215f4de557d950e0bfa73789d24acb5e...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1371977</th>\n",
       "      <td>ffffcf35913a0bee60e8741cb2b4e78b8a98ee5ff2e6a1...</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>ACTIVE</td>\n",
       "      <td>Regularly</td>\n",
       "      <td>21.0</td>\n",
       "      <td>4563fc79215672cd6a863f2b4bf56b8f898f2d96ed590e...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1371978</th>\n",
       "      <td>ffffd7744cebcf3aca44ae7049d2a94b87074c3d4ffe38...</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>ACTIVE</td>\n",
       "      <td>Regularly</td>\n",
       "      <td>18.0</td>\n",
       "      <td>8892c18e9bc3dca6aa4000cb8094fc4b51ee8db2ed14d7...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1371979</th>\n",
       "      <td>ffffd9ac14e89946416d80e791d064701994755c3ab686...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>PRE-CREATE</td>\n",
       "      <td>NONE</td>\n",
       "      <td>65.0</td>\n",
       "      <td>0a1a03306fb2f62164c2a439b38c0caa64b40deaae8687...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1371980 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                               customer_id   FN  Active  \\\n",
       "0        00000dbacae5abe5e23885899a1fa44253a17956c6d1c3...  NaN     NaN   \n",
       "1        0000423b00ade91418cceaf3b26c6af3dd342b51fd051e...  NaN     NaN   \n",
       "2        000058a12d5b43e67d225668fa1f8d618c13dc232df0ca...  NaN     NaN   \n",
       "3        00005ca1c9ed5f5146b52ac8639a40ca9d57aeff4d1bd2...  NaN     NaN   \n",
       "4        00006413d8573cd20ed7128e53b7b13819fe5cfc2d801f...  1.0     1.0   \n",
       "...                                                    ...  ...     ...   \n",
       "1371975  ffffbbf78b6eaac697a8a5dfbfd2bfa8113ee5b403e474...  NaN     NaN   \n",
       "1371976  ffffcd5046a6143d29a04fb8c424ce494a76e5cdf4fab5...  NaN     NaN   \n",
       "1371977  ffffcf35913a0bee60e8741cb2b4e78b8a98ee5ff2e6a1...  1.0     1.0   \n",
       "1371978  ffffd7744cebcf3aca44ae7049d2a94b87074c3d4ffe38...  1.0     1.0   \n",
       "1371979  ffffd9ac14e89946416d80e791d064701994755c3ab686...  NaN     NaN   \n",
       "\n",
       "        club_member_status fashion_news_frequency   age  \\\n",
       "0                   ACTIVE                   NONE  49.0   \n",
       "1                   ACTIVE                   NONE  25.0   \n",
       "2                   ACTIVE                   NONE  24.0   \n",
       "3                   ACTIVE                   NONE  54.0   \n",
       "4                   ACTIVE              Regularly  52.0   \n",
       "...                    ...                    ...   ...   \n",
       "1371975             ACTIVE                   NONE  24.0   \n",
       "1371976             ACTIVE                   NONE  21.0   \n",
       "1371977             ACTIVE              Regularly  21.0   \n",
       "1371978             ACTIVE              Regularly  18.0   \n",
       "1371979         PRE-CREATE                   NONE  65.0   \n",
       "\n",
       "                                               postal_code  \n",
       "0        52043ee2162cf5aa7ee79974281641c6f11a68d276429a...  \n",
       "1        2973abc54daa8a5f8ccfe9362140c63247c5eee03f1d93...  \n",
       "2        64f17e6a330a85798e4998f62d0930d14db8db1c054af6...  \n",
       "3        5d36574f52495e81f019b680c843c443bd343d5ca5b1c2...  \n",
       "4        25fa5ddee9aac01b35208d01736e57942317d756b32ddd...  \n",
       "...                                                    ...  \n",
       "1371975  7aa399f7e669990daba2d92c577b52237380662f36480b...  \n",
       "1371976  3f47f1279beb72215f4de557d950e0bfa73789d24acb5e...  \n",
       "1371977  4563fc79215672cd6a863f2b4bf56b8f898f2d96ed590e...  \n",
       "1371978  8892c18e9bc3dca6aa4000cb8094fc4b51ee8db2ed14d7...  \n",
       "1371979  0a1a03306fb2f62164c2a439b38c0caa64b40deaae8687...  \n",
       "\n",
       "[1371980 rows x 7 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_csv(\"./Data/customers.csv\", sep=',')\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>customer_id</th>\n",
       "      <th>FN</th>\n",
       "      <th>Active</th>\n",
       "      <th>club_member_status</th>\n",
       "      <th>fashion_news_frequency</th>\n",
       "      <th>age</th>\n",
       "      <th>postal_code</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>00000dbacae5abe5e23885899a1fa44253a17956c6d1c3...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>ACTIVE</td>\n",
       "      <td>NONE</td>\n",
       "      <td>49.0</td>\n",
       "      <td>52043ee2162cf5aa7ee79974281641c6f11a68d276429a...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0000423b00ade91418cceaf3b26c6af3dd342b51fd051e...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>ACTIVE</td>\n",
       "      <td>NONE</td>\n",
       "      <td>25.0</td>\n",
       "      <td>2973abc54daa8a5f8ccfe9362140c63247c5eee03f1d93...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>000058a12d5b43e67d225668fa1f8d618c13dc232df0ca...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>ACTIVE</td>\n",
       "      <td>NONE</td>\n",
       "      <td>24.0</td>\n",
       "      <td>64f17e6a330a85798e4998f62d0930d14db8db1c054af6...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>00005ca1c9ed5f5146b52ac8639a40ca9d57aeff4d1bd2...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>ACTIVE</td>\n",
       "      <td>NONE</td>\n",
       "      <td>54.0</td>\n",
       "      <td>5d36574f52495e81f019b680c843c443bd343d5ca5b1c2...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>00006413d8573cd20ed7128e53b7b13819fe5cfc2d801f...</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>ACTIVE</td>\n",
       "      <td>Regularly</td>\n",
       "      <td>52.0</td>\n",
       "      <td>25fa5ddee9aac01b35208d01736e57942317d756b32ddd...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1371975</th>\n",
       "      <td>ffffbbf78b6eaac697a8a5dfbfd2bfa8113ee5b403e474...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>ACTIVE</td>\n",
       "      <td>NONE</td>\n",
       "      <td>24.0</td>\n",
       "      <td>7aa399f7e669990daba2d92c577b52237380662f36480b...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1371976</th>\n",
       "      <td>ffffcd5046a6143d29a04fb8c424ce494a76e5cdf4fab5...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>ACTIVE</td>\n",
       "      <td>NONE</td>\n",
       "      <td>21.0</td>\n",
       "      <td>3f47f1279beb72215f4de557d950e0bfa73789d24acb5e...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1371977</th>\n",
       "      <td>ffffcf35913a0bee60e8741cb2b4e78b8a98ee5ff2e6a1...</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>ACTIVE</td>\n",
       "      <td>Regularly</td>\n",
       "      <td>21.0</td>\n",
       "      <td>4563fc79215672cd6a863f2b4bf56b8f898f2d96ed590e...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1371978</th>\n",
       "      <td>ffffd7744cebcf3aca44ae7049d2a94b87074c3d4ffe38...</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>ACTIVE</td>\n",
       "      <td>Regularly</td>\n",
       "      <td>18.0</td>\n",
       "      <td>8892c18e9bc3dca6aa4000cb8094fc4b51ee8db2ed14d7...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1371979</th>\n",
       "      <td>ffffd9ac14e89946416d80e791d064701994755c3ab686...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>PRE-CREATE</td>\n",
       "      <td>NONE</td>\n",
       "      <td>65.0</td>\n",
       "      <td>0a1a03306fb2f62164c2a439b38c0caa64b40deaae8687...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1371980 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                               customer_id   FN  Active  \\\n",
       "0        00000dbacae5abe5e23885899a1fa44253a17956c6d1c3...  0.0     0.0   \n",
       "1        0000423b00ade91418cceaf3b26c6af3dd342b51fd051e...  0.0     0.0   \n",
       "2        000058a12d5b43e67d225668fa1f8d618c13dc232df0ca...  0.0     0.0   \n",
       "3        00005ca1c9ed5f5146b52ac8639a40ca9d57aeff4d1bd2...  0.0     0.0   \n",
       "4        00006413d8573cd20ed7128e53b7b13819fe5cfc2d801f...  1.0     1.0   \n",
       "...                                                    ...  ...     ...   \n",
       "1371975  ffffbbf78b6eaac697a8a5dfbfd2bfa8113ee5b403e474...  0.0     0.0   \n",
       "1371976  ffffcd5046a6143d29a04fb8c424ce494a76e5cdf4fab5...  0.0     0.0   \n",
       "1371977  ffffcf35913a0bee60e8741cb2b4e78b8a98ee5ff2e6a1...  1.0     1.0   \n",
       "1371978  ffffd7744cebcf3aca44ae7049d2a94b87074c3d4ffe38...  1.0     1.0   \n",
       "1371979  ffffd9ac14e89946416d80e791d064701994755c3ab686...  0.0     0.0   \n",
       "\n",
       "        club_member_status fashion_news_frequency   age  \\\n",
       "0                   ACTIVE                   NONE  49.0   \n",
       "1                   ACTIVE                   NONE  25.0   \n",
       "2                   ACTIVE                   NONE  24.0   \n",
       "3                   ACTIVE                   NONE  54.0   \n",
       "4                   ACTIVE              Regularly  52.0   \n",
       "...                    ...                    ...   ...   \n",
       "1371975             ACTIVE                   NONE  24.0   \n",
       "1371976             ACTIVE                   NONE  21.0   \n",
       "1371977             ACTIVE              Regularly  21.0   \n",
       "1371978             ACTIVE              Regularly  18.0   \n",
       "1371979         PRE-CREATE                   NONE  65.0   \n",
       "\n",
       "                                               postal_code  \n",
       "0        52043ee2162cf5aa7ee79974281641c6f11a68d276429a...  \n",
       "1        2973abc54daa8a5f8ccfe9362140c63247c5eee03f1d93...  \n",
       "2        64f17e6a330a85798e4998f62d0930d14db8db1c054af6...  \n",
       "3        5d36574f52495e81f019b680c843c443bd343d5ca5b1c2...  \n",
       "4        25fa5ddee9aac01b35208d01736e57942317d756b32ddd...  \n",
       "...                                                    ...  \n",
       "1371975  7aa399f7e669990daba2d92c577b52237380662f36480b...  \n",
       "1371976  3f47f1279beb72215f4de557d950e0bfa73789d24acb5e...  \n",
       "1371977  4563fc79215672cd6a863f2b4bf56b8f898f2d96ed590e...  \n",
       "1371978  8892c18e9bc3dca6aa4000cb8094fc4b51ee8db2ed14d7...  \n",
       "1371979  0a1a03306fb2f62164c2a439b38c0caa64b40deaae8687...  \n",
       "\n",
       "[1371980 rows x 7 columns]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['FN'].fillna(0.0, inplace=True)\n",
    "df['Active'].fillna(0.0, inplace=True)\n",
    "df['club_member_status'].fillna('PRE-CREATE', inplace=True)\n",
    "df['fashion_news_frequency'].fillna('NONE', inplace=True)\n",
    "df['age'].fillna(df['age'].mean(), inplace=True)\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "customer_id False\n",
      "FN False\n",
      "Active False\n",
      "club_member_status False\n",
      "fashion_news_frequency False\n",
      "age False\n",
      "postal_code False\n"
     ]
    }
   ],
   "source": [
    "for col in df.columns:\n",
    "    detect_nan = df[col].isnull().values.any()\n",
    "    print(col, detect_nan)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(1371980, (1371980,))"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from bidict import bidict\n",
    "customer_bidict = bidict()\n",
    "# start counting from 0\n",
    "customer_cnt = 0\n",
    "customer_id = []\n",
    "for id in df['customer_id']:\n",
    "    if id not in customer_bidict:\n",
    "        customer_bidict[id] = customer_cnt\n",
    "        customer_cnt += 1\n",
    "    customer_id.append(customer_bidict[id])\n",
    "customer_id = np.array(customer_id, dtype='int')\n",
    "customer_cnt, customer_id.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([      0,       1,       2, ..., 1371977, 1371978, 1371979])"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "customer_id"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(1371980,) (1371980,) (1371980,) (1371980,) (1371980,)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "(array([0, 0, 0, ..., 1, 1, 0]),\n",
       " array([0, 0, 0, ..., 1, 1, 0]),\n",
       " array([1, 1, 1, ..., 1, 1, 0]),\n",
       " array([0, 0, 0, ..., 1, 1, 0]),\n",
       " array([49., 25., 24., ..., 21., 18., 65.]))"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "FN = [0 if x < 0.5 else 1 for x in df['FN']]\n",
    "Active = [0 if x < 0.5 else 1 for x in df['Active']]\n",
    "club_member_status = [1 if x == 'ACTIVE' else 0 for x in df['club_member_status']]\n",
    "fashion_news_frequency = [1 if x == 'Regularly' else 0 for x in df['fashion_news_frequency']]\n",
    "age = [x for x in df['age']]\n",
    "\n",
    "FN = np.array(FN, dtype='int')\n",
    "Active = np.array(Active, dtype='int')\n",
    "club_member_status = np.array(club_member_status, dtype='int')\n",
    "fashion_news_frequency = np.array(fashion_news_frequency, dtype='int')\n",
    "age = np.array(age, dtype='float')\n",
    "\n",
    "print(FN.shape, Active.shape, club_member_status.shape, fashion_news_frequency.shape, age.shape)\n",
    "FN, Active, club_member_status, fashion_news_frequency, age\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "with open('./Data/Processed/customer_feat.pkl', 'wb') as f:\n",
    "    pkl.dump(customer_id, f, pkl.HIGHEST_PROTOCOL)\n",
    "    pkl.dump(FN, f, pkl.HIGHEST_PROTOCOL)\n",
    "    pkl.dump(Active, f, pkl.HIGHEST_PROTOCOL)\n",
    "    pkl.dump(club_member_status, f, pkl.HIGHEST_PROTOCOL)\n",
    "    pkl.dump(fashion_news_frequency, f, pkl.HIGHEST_PROTOCOL)\n",
    "    pkl.dump(age, f, pkl.HIGHEST_PROTOCOL)\n",
    "    pkl.dump(customer_cnt, f, pkl.HIGHEST_PROTOCOL)\n",
    "    pkl.dump(customer_bidict, f, pkl.HIGHEST_PROTOCOL)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "7c2e65e64076883662e9fbb467097aa6d81839e6b77012bdd0b6d8c4fbfb9623"
  },
  "kernelspec": {
   "display_name": "Python 3.7.11 ('SR-GNN')",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.11"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
